<%@ page language="java"  pageEncoding="UTF-8"%>
<%@include file="/common/jsp/cssAndScript.jsp"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@include file="/pages/head.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>鼎烜电力集团网络办公平台</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script src="${pageContext.request.contextPath}/common/js/My97DatePicker/WdatePicker.js"></script>
	</head>
	<body style="overflow:hidden;">		
		<div id="main_container">
			<div id="container_border">
				<div class="content_title">
					<h3 class="basedate_econTargetList_titleIcon">
						员工月度报表
					</h3>
				</div>
				<div class="form_primary">
					<table border="0" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>
								请选择业务员
								<s:select id="userId" list="users" onchange="changeUser(this.value)" name="tableVo.user.id" value="tableVo.user.id" headerKey="" headerValue="请选择" listKey="id" listValue="cname" theme="simple"/>
							</td>
							<td>
								开始时间<input readonly="readonly" value="${beginDate}" onclick="WdatePicker();"  class="smallinput" id="condition.unitName" name="beginDate" style="width:180px"/>
							</td>
							<td>
								结束时间<input  readonly="readonly" value="${endDate}" onclick="WdatePicker();"  class="smallinput" id="condition.unitName" name="endDate" style="width:180px"/>
							</td>
							<td style="width:25%;">
								<a class="btn_grid_box btn_file_icon2" href="javascript:void(0);" onclick="showDialog('鼎烜电力集团网络办公平台','gotoTable','500','350');">新建</a>
								<a class="btn_grid_box btn_search_file" style="margin-left:4px;" href="javascript:void(0);" onclick="searchRivalBySearchKey();">查询</a>
							</td>
						</tr>
					</table>
				</div>
				<p class="modle_hr"></p>
				<div class="window_1">
					<div id="_econTargetList_div_id">
						<%@include file="_table.jsp"%>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script>
	// 文本超过8个字符数时，用省略显示
		text_overflow( 10 );
	 	//查询方法
		function searchRivalBySearchKey(){
			var beginDate = document.getElementById("beginDate").value;
			var userId = document.getElementById("userId").value;
			var endDate = document.getElementById("endDate").value;
			location.href='<%=basePath %>table/getAllTableByDate?tableVo.user.id='+userId+'&beginDate='+beginDate+'&endDate='+endDate;
		}
        // 分页
		function gotoPage( pageNo , totalPage , pageSize ){
			// 按page的信息加载数据
			// 如果当前页大于了最大页数就弹出警告
			if( pageNo > totalPage ){
				window.alert( '总页数为'+totalPage+' , 请重新输入页码!' );
				return;
			}
			// 加载数据
			loadContent( '_econTargetList_div_id' , 'rivalAction!listRivalByPage.action?page.pageNo='+pageNo+'&page.totalPage='+totalPage+'&page.pageSize='+pageSize+'&condition.unitName=<s:property value="condition.unitName"/>',function() {setGridCss();setGridOddEvenCss();} );
		}
</script>
</html>
